<html>
<head>
    @include('v1.common.meta')
    <link rel="stylesheet" href="{{elixir('css/basicdata.css')}}">
</head>
<body>
<div class="yjs-grid">
    <div class="yjs-grid-box">
        <div class="layui-tab">
            @if(Auth::check())
                <div class="layui-container">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <fieldset class="layui-elem-field">
                                <legend>添加关联信息</legend>
                                <div class="layui-field-box">
                                    <div class="layui-row hidden-tips">
                                        <div class="layui-col-md12">
                                            <blockquote class="layui-elem-quote">
                                                温馨提示：新增数据时，存在"<i class="layui-icon">&#xe605;</i>"标识的表单项，建议您自主编辑维护；
                                            </blockquote>
                                        </div>
                                    </div>
                                    <div class="layui-form layui-form-pane" name="relateForm"
                                         action="javascript:;" method="POST">

                                        <input type="hidden" name="code" value="{{$code}}">
                                        <input type="hidden" name="arrival_code" value="{{$arrival_code}}">



                                        <div class="layui-row">
                                            <div class="layui-col-md12">
                                                <div class="layui-form-item">
                                                    <input type="radio" name="type" value="1" lay-filter="type" checked title="从公告选取">
                                                </div>

                                            </div>
                                        </div>

                                        <div class="layui-row">
                                            <div class="layui-col-md12">
                                                <div class="layui-form-item">
                                                    {{--<label class="layui-form-label"><i--}}
                                                                {{--class="layui-icon">&#xe605;</i>公告代码</label>--}}
                                                    {{--<div class="layui-input-inline">--}}
                                                        {{--<input id="notice_code" type="text" name="notice_code"--}}
                                                               {{--lay-filter="notice_code"--}}
                                                               {{--lay-verify="required|code"--}}
                                                               {{--class="layui-input">--}}
                                                    {{--</div>--}}

                                                    <label class="layui-form-label"><i
                                                                class="layui-icon">&#xe605;</i>公告名称</label>
                                                    <div class="layui-input-inline">
                                                        <select id="notice_code" name="notice_code"
                                                                lay-filter="notice_code"
                                                                lay-search="">
                                                            <option value="">直接选择或搜索选择</option>
                                                            @foreach($notices as $term)
                                                                <option value={{$term['code']}}>{{$term['title']}}</option>
                                                            @endforeach
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <input type="radio" name="type" value="2"  lay-filter="type" title="其他">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label"><i
                                                                class="layui-icon">&#xe605;</i>关联名称</label>
                                                    <div class="layui-input-inline">
                                                        <input id="name" type="text" name="name" disabled
                                                               lay-filter="name"
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label"><i
                                                                class="layui-icon">&#xe605;</i>关联链接</label>
                                                    <div class="layui-input-inline">
                                                        <input id="url" type="text" name="url" disabled
                                                               lay-filter="url"
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>


                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label">验证码</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="captcha" maxlength="4"
                                                               lay-verify="required"
                                                               placeholder="请输入图片验证码" autocomplete="off"
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md3">
                                                <div class="layui-form-item">
                                                    <img class="getLVcode" src="{{ captcha_src('mini') }}"
                                                         width="70px"
                                                         height="34px" style="border: 1px solid green;"/>
                                                    <div class="layui-form-mid layui-word-aux">
                                                        点击图片刷新验证码
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md3">
                                                {{--隐藏提交--}}
                                                <button id="toolbarSubmit" type="submit" class="layui-btn"
                                                        lay-filter="toolbarEvent" lay-submit style="display: none;">
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                </div>
            @else
                <div class="layui-container">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <blockquote class="layui-elem-quote-error">
                                友情提示：该功能只面向已成功登录系统，并具有相应权限的用户可用。
                            </blockquote>
                        </div>
                    </div>
                </div>
            @endif
        </div>
    </div>
</div>

@include('v1.common.js')
<script src="{{elixir('js/timetableRelate.js')}}"></script>
</body>
<script type="text/html">
    <input type="hidden" id="rspStatus" value="">
    <input type="hidden" id="rspMsg" value="">
</script>
</html>